<!--Descriptive page name, messages and instructions-->
<h2>Tag Wrangling Discussion</h2>
<!--/descriptions-->

<%= will_paginate(@comments) %>

<!--ADT FRONT END, suggest this should be an inbox-->
<div class="wrapper">
	<table summary="">
		<caption></caption>
		<thead>
			<tr>
    			<th scope="col">Tag</th>
    			<th scope="col">Comment</th>
    			<th scope="col">Replies</th>
    			<th scope="col">Thread Started By</th>
    			<th scope="col">Last Reply By</th>
    			<th scope="col">Last Updated At</th>
  			</tr>
		</thead>
		<tbody>
  <% for comment in @comments %>
  	<tr>
    	<td><%= link_to_tag(comment.parent) %></td>
    	<td><%= link_to strip_tags(comment.content[0..50]) + '...', comment, :title => strip_tags(comment.content) %></td>
    	<td><%= comment.count_all_comments %></td>
    	<td>
    	  <% if comment.pseud %>
    	  <%= link_to comment.pseud.name, [comment.pseud.user, comment.pseud] %>
    	  <% else %>
    	  <%=h comment.name %>
    	  <% end %>
    	</td>
    	<td><%= last_reply_by(comment) %></td>
    	<td><%= comment.updated_at %></td>
  	</tr>  
  <% end %>
	</tbody>
</table>
</div>
<div class="clear"><!--presentational, phase me out--></div>

<%= will_paginate(@comments) %>